package com.hill;
//注意调用初始化的顺序，初始化基类
class Art{
    Art(){
        System.out.println("art construtor!");
    }
}
class Drawing extends Art{
    Drawing(){
        System.out.println("drawing construtor!");
    }
}
public class Cartoon extends Drawing {
    public Cartoon(){
        System.out.println("cartoon construtor");
             }
    public static void main(String[] args) {
        Cartoon x = new Cartoon();
    }
}
// 输出：
//        art construtor!
//        drawing construtor!
//        cartoon construtor
